package com._21cn.cms.resource.config;

import com._21cn.cms.common.Constants;

/**
 * Created by Thinkpad on 2017/3/26.
 */
public class PictureConfig {

    private String allowedPictureFile = "(jpg|jpeg|gif|png)";            //允许图片格式

    private int maxFileSize = 5242880;                                      // 5Mb

    private int maxPixelNumber = 5 * 1024 * 1024;                           // 500万像素

    private String saveFilePath = "/data/images/";                         //保存路径

    private String cacheFilePath = "/data/images_cache/photos/";

    private String defaultHost = Constants.DEFAULT_IMAGE_HOST;                             //默认图片存储

    private int pictureNotFoundCacheTime = 61;                              // 单位：秒

    private int pictureNotPassCacheTime = 12 * 3600;                        // 12小时 单位：秒

    private int pictureErrorCacheTime = 61;                                 // 单位：秒

    private int pictureCacheTime = 72 * 3600;                                // 单位：秒

    private int thumbMaxWidth = 120;

    private int thumbMaxHeight = 120;

    private int midMaxWidth = 720;

    private int midMaxHeight = 720;

    private int maxWidth = 1920;

    private int maxHeight = 19200; // 支持微博长图

    public String getCacheFilePath() {
        return cacheFilePath;
    }

    public void setCacheFilePath(String cacheFilePath) {
        this.cacheFilePath = cacheFilePath;
    }

    public int getThumbMaxWidth() {
        return thumbMaxWidth;
    }

    public void setThumbMaxWidth(int thumbMaxWidth) {
        this.thumbMaxWidth = thumbMaxWidth;
    }

    public int getThumbMaxHeight() {
        return thumbMaxHeight;
    }

    public void setThumbMaxHeight(int thumbMaxHeight) {
        this.thumbMaxHeight = thumbMaxHeight;
    }

    public int getMidMaxWidth() {
        return midMaxWidth;
    }

    public void setMidMaxWidth(int midMaxWidth) {
        this.midMaxWidth = midMaxWidth;
    }

    public int getMidMaxHeight() {
        return midMaxHeight;
    }

    public void setMidMaxHeight(int midMaxHeight) {
        this.midMaxHeight = midMaxHeight;
    }

    public int getPictureCacheTime() {
        return pictureCacheTime;
    }

    public void setPictureCacheTime(int pictureCacheTime) {
        this.pictureCacheTime = pictureCacheTime;
    }

    public int getPictureNotPassCacheTime() {
        return pictureNotPassCacheTime;
    }

    public void setPictureNotPassCacheTime(int pictureNotPassCacheTime) {
        this.pictureNotPassCacheTime = pictureNotPassCacheTime;
    }

    public int getPictureErrorCacheTime() {
        return pictureErrorCacheTime;
    }

    public void setPictureErrorCacheTime(int pictureErrorCacheTime) {
        this.pictureErrorCacheTime = pictureErrorCacheTime;
    }

    public int getPictureNotFoundCacheTime() {
        return pictureNotFoundCacheTime;
    }

    public void setPictureNotFoundCacheTime(int pictureNotFoundCacheTime) {
        this.pictureNotFoundCacheTime = pictureNotFoundCacheTime;
    }

    //默认站点

    private int defaultSiteId = 1;

    public int getDefaultSiteId() {
        return defaultSiteId;
    }

    public void setDefaultSiteId(int defaultSiteId) {
        this.defaultSiteId = defaultSiteId;
    }

    public int getMaxWidth() {
        return maxWidth;
    }

    public void setMaxWidth(int maxWidth) {
        this.maxWidth = maxWidth;
    }

    public int getMaxHeight() {
        return maxHeight;
    }

    public void setMaxHeight(int maxHeight) {
        this.maxHeight = maxHeight;
    }

    public String getDefaultHost() {
        return defaultHost;
    }

    public void setDefaultHost(String defaultHost) {
        this.defaultHost = defaultHost;
    }

    public String getSaveFilePath() {
        return saveFilePath;
    }

    public void setSaveFilePath(String saveFilePath) {
        this.saveFilePath = saveFilePath;
    }

    public int getMaxPixelNumber() {
        return maxPixelNumber;
    }

    public void setMaxPixelNumber(int maxPixelNumber) {
        this.maxPixelNumber = maxPixelNumber;
    }

    public String getAllowedPictureFile() {
        return allowedPictureFile;
    }

    public void setAllowedPictureFile(String allowedPictureFile) {
        this.allowedPictureFile = allowedPictureFile;
    }

    public int getMaxFileSize() {
        return maxFileSize;
    }

    public void setMaxFileSize(int maxFileSize) {
        this.maxFileSize = maxFileSize;
    }

}
